﻿/* * 版 本 PIT-ADMS V7.0.3 敏捷开发框架
 * Copyright (c) 2013-2018 Hexagon PPM
 * 创建人：超级管理员
 * 日  期：2022-02-28 14:47
 * 描  述：通道表
 */
var refreshGirdData;
var ProjectId = request('ProjectId');
var WireGroupID = request('WireGroupID');

var bootstrap = function ($, learun) {
    "use strict";
    var page = {
        init: function () {
            page.initGird();
            page.bind();
        },
        bind: function () {
            // 查询
            $('#btn_Search').on('click', function () {
                page.search();
            });
            // 刷新
            $('#lr_refresh').on('click', function () {
                location.reload();
            });
        },
        initGird: function () {
            $('#gridtable').jfGrid({
                url: top.$.rootUrl + '/ZZDT_EC/ec_wire_group_propertyhis/GetPageList',
                headData: [
                    { label: '属性名称', name: 'PropertyName', width: 150, align: "center", sort: false },
                    { label: '旧属性值', name: 'OldPropertyValue', width: 150, align: "center", sort: false },
                    { label: '新属性值', name: 'NewPropertyValue', width: 100, align: "center", sort: false },
                    { label: '创建时间', name: 'CreateTime', width: 150, align: "center", sort: false },
                    { name: "", width: 1, sort: false }
                ],
                mainId: 'WireGroupPropertyhisID',
                isPage: true
            });
            page.search();
        },
        search: function (param) {
            param = param || {};
            param.ProjectId = ProjectId;
            param.WireGroupID = WireGroupID;
            param.PropertyName = $("#PropertyName").val();
            $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
        }
    };
    refreshGirdData = function () {
        $('#gridtable').jfGridSet('reload');
    };
    page.init();
}
